package com.xiaoyu.izf.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "yqf_store", schema = "izf", catalog = "")
public class YqfStore {
    private String id;
    private int storeNo;
    private String storeName;
    private String province;
    private String city;
    private String phone;
    private String merchantName;
    private String merchantId;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "store_no")
    public int getStoreNo() {
        return storeNo;
    }

    public void setStoreNo(int storeNo) {
        this.storeNo = storeNo;
    }

    @Basic
    @Column(name = "store_name")
    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "merchant_name")
    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    @Basic
    @Column(name = "merchant_id")
    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YqfStore yqfStore = (YqfStore) o;
        return storeNo == yqfStore.storeNo &&
                Objects.equals(id, yqfStore.id) &&
                Objects.equals(storeName, yqfStore.storeName) &&
                Objects.equals(province, yqfStore.province) &&
                Objects.equals(city, yqfStore.city) &&
                Objects.equals(phone, yqfStore.phone) &&
                Objects.equals(merchantName, yqfStore.merchantName) &&
                Objects.equals(merchantId, yqfStore.merchantId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, storeNo, storeName, province, city, phone, merchantName, merchantId);
    }
}
